package com.xw.unification.entity;

import com.xw.unification.interfaces.UnifiedExceptionResolvable;
import lombok.Getter;
import lombok.Setter;

import javax.servlet.http.HttpServletRequest;

@Getter
@Setter
public class UnifiedErrorBody extends ErrorBody {

    private Object body;

    public UnifiedErrorBody(HttpServletRequest request, UnifiedExceptionResolvable exception) {
        super(request, exception);
        this.body = exception == null ? null : exception.getBody();
    }

    public UnifiedErrorBody(HttpServletRequest request, UnifiedExceptionResolvable exception, String message) {
        super(request, exception, message);
        this.body = exception == null ? null : exception.getBody();
    }

}
